﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using QBWeb.Models;
using QBWeb.Models.CurriculumFolder;
using QBWeb.ViewModels;

namespace QBWeb.BLL
{
    public class InterfaceBll
    {
        #region 课程模块BLL接口
        public static void AddCurriculum(string curriName, string year, string semester,string userId)
        {
            CurriculumBll.AddCurriculum(curriName, year, semester,userId);
        }
        public static void EditCurriculum(string curriName, string year, string semester, int Id)
        {
            CurriculumBll.EditCurriculum(curriName, year, semester, Id);
        }
        public static void DeleteCurriculum(int curriculumId)
        {
            CurriculumBll.DeleteCurriculum(curriculumId);
        }
        /*----------------------------------分割线---------------------------------------*/
        public static void AddClasses(int curriculumId, string className)
        {
            CurriculumBll.AddClasses(curriculumId, className);
        }
        public static void EditClasses(int curriculumId, string newName, string oldName)
        {
            CurriculumBll.EditClasses(curriculumId,newName,oldName);
        }
        public static void DeleteClasses(int curriculumId, string className)
        {
            CurriculumBll.DeleteClasses(curriculumId,className);
        }
        /*----------------------------------分割线---------------------------------------*/
        public static void EditModule(string newTitle, int varyId, int id, int rank)
        {
            CurriculumBll.EditModule(newTitle,varyId,id,rank);
        }

        public static bool DeleteModule(int id, int rank)
        {
            return CurriculumBll.DeleteModule(id,rank);
        }

        public static List<TempList> AddModule(string newTitle, string teacherId, int id, int rank, int cid)
        {
            return CurriculumBll.AddModule(newTitle, id,rank,cid);

        }
        #region 加课BLL接口
        public static void JoinCurricula(string studentId, int curriculumId, string className)
        {
            CurriculumBll.JoinCurricula(studentId, curriculumId, className);
        }

        public static void QuitCurricula([Bind(Include = "CurriculumId,StudentId")] Curri_StudentTb curriStudent)
        {
           CurriculumBll.QuitCurricula(curriStudent);
        }
        #endregion

        #endregion

        #region 试卷模块BLL接口
        public static void CreateTest(string testName,string userName,int cid)
        {
            TestPaperBll.CreateTest(testName, userName,cid);
        }
        public static void PutOut(int id,string notes,int[] classes,DateTime startTime,DateTime endTime,int? onTime)
        {
            TestPaperBll.PutOut(id, notes,classes, startTime, endTime, onTime);
        }
        public static void EditTest(int testPaperTbId, string testName, string creator)
        {
            TestPaperBll.EditTest(testPaperTbId, testName, creator);
        }
        public static void DeleteTest(int testPaperTbId)
        {
            TestPaperBll.DeleteTest(testPaperTbId);
        }
        /*----------------------------------分割线---------------------------------------*/
        //public static Dictionary<int,Dictionary<string,string>> CreateSingleChoice(int questionIndex,int dataId,int questTypeTbId,string[] options,string questName,string[] choiceValue,string[] choiceChecked,string questAnalysis,int testDetailsId,string score)
        //{
        //    return QuestionBll.CreateSingleChoice(questionIndex, dataId, questTypeTbId, options, questName, choiceValue, choiceChecked, questAnalysis, testDetailsId, score);
        //}
        //public static Dictionary<int, Dictionary<string, string>> CreateTrueFalse(int questionIndex, int dataId, int questTypeTbId, string questName, int correctValue, string questAnalysis, int testDetailsId, string score)
        //{
        //    return QuestionBll.CreateTrueFalse(questionIndex, dataId, questTypeTbId, questName, correctValue, questAnalysis, testDetailsId, score);
        //}
        //public static Dictionary<int, Dictionary<string, string>> CreateBlanks(int questionIndex, int dataId, int questTypeTbId, string questName, string correctValue, string questAnalysis, int testDetailsId, string score)
        //{
        //    return QuestionBll.CreateBlanks(questionIndex, dataId, questTypeTbId, questName, correctValue, questAnalysis, testDetailsId, score);
        //}
        //public static void SaveResult(Dictionary<int,Dictionary<string,string>> dicDic)
        //{
        //    QuestionBll.SaveResult(dicDic);
        //}
        public static void SaveQuestions(AllQuestionModels allQuestion,string teacherId,int cid)
        {
            QuestionBll.SaveQuestions(allQuestion,teacherId,cid);
        }
        #endregion



        #region N/A BLL接口
        //内容
        #endregion

        #region N/A BLL接口
        //内容
        #endregion

        #region N/A BLL接口
        //内容
        #endregion

        #region N/A BLL接口
        //内容
        #endregion

        #region 题目分类管理 BLL接口
        //内容
        public static void ModifyQuestClass(int id, string classData)
        {
            CurriculumBll.ModifyQuestClass(id, classData);
        }
        #endregion

    }
}